#include "config.h"
#define         N_TASKS              2    // Number of tasks
#define         TASK_STK_SIZE       128   // Stack size
OS_STK TaskStk[N_TASKS][TASK_STK_SIZE];              // Tasks stacks
void Task0(void *pdata);
void Task1(void *pdata);
// Entrance of C prog
int main_entry (void)
{
     OSInit ();
    OSTaskCreate(Task0, (void *)0, &TaskStk[0][TASK_STK_SIZE-1], 0);
    OSTaskCreate(Task1, (void *)0, &TaskStk[1][TASK_STK_SIZE-1], 1);
     TargetInit ();
     OSStart ();
     return 0;
}
void Task0(void *pdata)
{
    pdata = pdata;        // Avoid compilation warning.
    while(1)
    {
		U0THR = 'L';
		U0THR = 'i';
		U0THR = 't';
		U0THR = 't';
		U0THR = 'l';
		U0THR = 'e';
		OSTimeDly(500);
    }
}
void Task1(void *pdata)
{
    pdata = pdata;        // Avoid compilation warning.
    while(1)
    {
		U0THR = ' ';
		U0THR = 'W';
		U0THR = 'h';
		U0THR = 'i';
		U0THR = 't';
		U0THR = 'e';
		U0THR = ' ';
		OSTimeDly(500);
    }
}

